package com.hmall.api.user;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 用户服务接口
 *
 * @Author mr.li
 * @Date 2025/8/20 23:14
 */
@FeignClient(name = "user-service", path = "/users")
public interface UserClient {

    /**
     * 扣减用户余额
     * @param pw
     * @param amount
     */
    @PutMapping("/money/deduct")
    public void deductMoney(@RequestParam("pw") String pw, @RequestParam("amount") Integer amount);
}
